package com.csdj.t309tgspringboot.controller;

import com.csdj.t309tgspringboot.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class TestController {


    @GetMapping("/indexs")
    public String test(Model model){
        List<String> list = new ArrayList<>();
        list.add("asdfas");
        list.add("asdfas");
        list.add("asdfas");
        list.add("asdfas");
        model.addAttribute("list",list);
        User user = new User();
        user.setId(20);
        model.addAttribute("user",user);
        model.addAttribute("name","cloud");
        return "indexs";
    }
}
